home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 60.zip / BS1 part 60 / Imagemaster d1.adf / install-im < prev    next >
Text File  |  1993-08-31  |  23KB  |  649 lines

  1. ; CBM installer script to install Imagemaster R/t on users
  2. ; hard-drive. Loosely derived from the original Imagemaster
  3. ; installation script.
  4. ; --------------------------------------------------------------
  5. ; Copyright 1993, Black Belt Systems, ALL RIGHTS RESERVED
  6. ; --------------------------------------------------------------
  7. ;     Written by: Ben Williams
  8. ;   Date Written: July 26th, 1993
  9. ;            For: Imagemaster R/t v1.00
  10. ; --------------------------------------------------------------
  11. ;        Updates: None at this time
  12. ; --------------------------------------------------------------
  13. ;Notes:
  14. ;------->
  15. ;  (1) We force a minimum level of AVERAGE user so that they
  16. ;      must specify the target directory for the install and
  17. ;      answer some basic questions such as "Do you have an FPU"
  18. ;
  19. ;  (2) There must be sufficient diskspace to install the software
  20. ;      or we won't even try to install.
  21. ;
  22. ;  (3) The ARexx REXX assign must be available, or we can't install
  23. ;
  24. ;  (4) If the user has already assigned targets for ALL of:
  25. ;           RXPI:
  26. ;           CMPI:
  27. ;           IMDOC:
  28. ;           IMCAT:
  29. ;      Then we will not attempt to create directories in the
  30. ;      Imagemaster R/t drawer for them. Instead, we will install
  31. ;      the relevant portions of the software to the specified
  32. ;      locations. This MAY defeat the available space checking
  33. ;      code in the install script, if these locations are on
  34. ;      a different volume than the target volume.
  35. ;
  36. ;  (5) Max split size is 840,000 bytes
  37. ;------------------------------------------------------------------
  38.  
  39.  
  40. ; Install script is initiated from disk one of the install group,
  41. ; so we do all things we possibly can from disk 1, first.
  42. ; Disk 1 is where most of the miscellaneous items are stored.
  43. ;----------------------------------------------------------------
  44.  
  45. ; cleanup routine
  46. ;----------------
  47. (onerror)
  48.  
  49. ; Create disk filesystem names and volume names
  50. ; Some installer functions want the ":" character, and
  51. ; some don't. Another blow for consistancy in programming.
  52. ; --------------------------------------------------------
  53. (set d1 "IM_Install1:") (set v1 "IM_Install1")
  54. (set d2 "IM_Install2:") (set v2 "IM_Install2")
  55. (set d3 "IM_Install3:") (set v3 "IM_Install3")
  56. (set d4 "IM_Install4:") (set v4 "IM_Install4")
  57. (set d5 "IM_Install5:") (set v5 "IM_Install5")
  58. (set d6 "IM_Install6:") (set v6 "IM_Install6")
  59.  
  60. ; This IM R/t release is (approximately) sized as follows:
  61. ;---------------------------------------------------------
  62. (set misc_spc 50000)
  63. (set imrt_spc 2100000)
  64. (set film_spc 180000)
  65. (set isha_spc 25000)
  66. (set devl_spc 10000)
  67. (set pimo_spc 2000000)
  68. (set apas_spc 60000)
  69. (set adoc_spc 1400000)
  70.  
  71. ; Make certain rexx: directory exists - if ARexx isn't running, we
  72. ; can (sortof) live with that, though the user will be seriously
  73. ; crippled in capability. If no assignment exists, we're toast
  74. ;-----------------------------------------------------------------
  75. (if (= (getassign "rexx") "")
  76.     ( ; Then...
  77.         (abort "Cannot install - no REXX: assignment in this system. "
  78.                "You MUST have ARexx and a drawer assigned to REXX: "
  79.                "to hold ARexx scripts in order to successfully "
  80.                "install Imagemaster. Please properly configure "
  81.                "your computer and try again. If you do not know how "
  82.                "to accomplish this, call your dealer or consultant."
  83.         )
  84.     )
  85. )
  86.  
  87. ; Find out where user wants to put Imageaster
  88. ;--------------------------------------------
  89. (set user_place
  90.     (askdir
  91.         (prompt "On which Volume shall we place the Imagemaster Drawer? ")
  92.         (help @askdir-help "It is important that you realize that the destination volume you specify "
  93.                            "here is where the DRAWER in which Imagemaster and its associated data "
  94.                            "files will be placed. Even if this is an update to an earlier "
  95.                            "installation, you still need to specify this location the same way. "
  96.                            "Otherwise, a new \"Imagemaster\" drawer will be created INSIDE your "
  97.                            "old one, causing much confusion and not amusing anyone.")
  98.         (default @default-dest)
  99.     )
  100. )
  101.  
  102. ; Check to see if assigns are already made
  103. ; This accounts for custom installs by techno-types
  104. ;--------------------------------------------------
  105. (set as_made 0)
  106. (if (<> (getassign "rxpi:") "")
  107.     (if (<> (getassign "cmpi:") "")
  108.         (if (<> (getassign "IMDOC:") "")
  109.             (if (<> (getassign "IMCAT:") "")
  110.                (set as_made 1) ; All four assigns must be made!
  111.             )
  112.         )
  113.     )
  114. )
  115.  
  116. ; Find out if user wants the developer code
  117. ;------------------------------------------
  118. (set dev_install
  119.     (askoptions
  120.         (prompt "Would you like to have the Public Interface developer "
  121.                 "C and ARexx code, with documentation? This will allow "
  122.                 "you to create public interface modules of your own, IF "
  123.                 "you own the SAS C compiler and have typical Amiga "
  124.                 "developer skills.")
  125.                 (help @askoptions-help "If you are NOT a technical type, "
  126.                 "you have no need for this data. If you are, then by all "
  127.                 "means install it!")
  128.         (choices "Install SAS C and ARexx developer code?")
  129.         (default 0)
  130.     )
  131. )
  132.  
  133. ; Check with user if they want the floating point version
  134. ;--------------------------------------------------------
  135. (set float_install
  136.     (askchoice
  137.         (prompt "Install the hardware floating-point version? ")
  138.         (help "An FPU is a special hardware mathematics processor "
  139.               "which allows a computer which uses it to figure out "
  140.               "answers to math problems using floating point math "
  141.               "much faster than it could without an FPU. A 68000 "
  142.               "Amiga has no FPU. 68020 or 68030 based-Amigas may "
  143.               "have an FPU - check your documentation if you're not "
  144.               "certain. 68040-based Amigas always have the FPU built "
  145.               "right in. The non-FPU version will work on an Amiga "
  146.               "with an FPU, however it will be much slower which "
  147.               "will cost you unecessary time when processing images. "
  148.               @askchoice-help)
  149.         (choices "Install Floating Point (FPU) version"
  150.                  "Install standard (NON-FPU) version")
  151.         (default 1)
  152.     )
  153. )
  154.  
  155. ; Derive total install space
  156. ; for required elements of installation:
  157. ; ----------------------------------------------------------------
  158. (set total_size imrt_spc)                ; Imagemaster R/t
  159. (set total_size (+ total_size film_spc)) ; Filmstrip Viewer
  160. (set total_size (+ total_size isha_spc)) ; IShapes files
  161. (set total_size (+ total_size pimo_spc)) ; PI Modules
  162. (set total_size (+ total_size adoc_spc)) ; Hypertext Documentation
  163. (set total_size (+ total_size misc_spc)) ; Any remaining items...
  164.  
  165. ; Add space for developer code, if desired
  166. ; ----------------------------------------
  167. (if (= dev_install 1)
  168.     ( ; Then...
  169.         (set total_size (+ total_size devl_spc)) ; Developer Code
  170.     )
  171. )
  172.  
  173. ; Decide if we can install ApAssist in the c: directory
  174. ; If we can, we do it immediately, before we do the rest
  175. ; of the install - this will ensure that the disk space
  176. ; check will take it into account if it is on the same
  177. ; volume by virtue of its already taking up space; if
  178. ; it's not on the same volume, then we won't "see" it in
  179. ; the disk space check, and that works fine too. This
  180. ; install comes from disk one:
  181. ; -----------------------------------------------------
  182. (set app_space  (getdiskspace "c:"))
  183. (if (< app_space apas_spc)
  184.     ( ; Then
  185.         (set app_in_c 0)
  186.         (set total_size (+ total_size apas_spc)) ; ApAssist executable
  187.         (copyfiles (source d1)
  188.                (dest "ram:")
  189.                (pattern "ApAssist")
  190.                (files)
  191.         )
  192.     )
  193.     ( ; Else...
  194.         (set app_in_c 1)
  195.         (copyfiles (source d1)
  196.                (dest "c:")
  197.                (pattern "ApAssist")
  198.                (files)
  199.         )
  200.     )
  201. )
  202.  
  203. ; At this point, we've got a pretty good handle on installation
  204. ; storage requirements, with the possible exception of if the
  205. ; user has created custom assignments for all of RXPI, CMPI,
  206. ; IMDOC and IMCAT - in which case we can mistakenly abort here
  207. ; if the target disk is short on space. Hopefully a technically
  208. ; competant user such as would intentionally redirect the
  209. ; installation using assigns will manage their system well
  210. ; enough to avoid that problem. If we can't do the main install,
  211. ; we quit immediately with an informative message.
  212. ; -------------------------------------------------
  213. (set tgt_space  (getdiskspace user_place))
  214. (if (< tgt_space total_size)
  215.     ( ; Then...
  216.         (abort "This installation requires about " ("%ld" total_size)
  217.                " bytes free on the "
  218.                "volume where you wish to install Imagemaster. Please "
  219.                "make this space available and then re-install. For your "
  220.                "information, the volume you have selected has only "
  221.                ("%ld " tgt_space) "bytes free. You need "
  222.                ("%ld " (- total_size tgt_space)) "more bytes."
  223.         )
  224.     )
  225. )
  226.  
  227. ; Get the items we need from disk 1
  228. ;----------------------------------
  229. (copyfiles (source d1)
  230.            (dest "ram:")
  231.            (pattern "(extract|join|delete|fv.lzh|ish.lzh|imi.lzh|dc.lzh|ia.lzh|ib.lzh)")
  232.            (files)
  233. )
  234.  
  235. (if (= dev_install 1)
  236.     ( ; Then...
  237.         (copyfiles (source d1)
  238.                    (dest "ram:")
  239.                    (pattern "dd.lzh")
  240.                    (files)
  241.         )
  242.     )
  243. )
  244.  
  245. ; We've got the target; now we need to make sure that we have our main DIR
  246. ;-------------------------------------------------------------------------
  247. (set im_dest (tackon user_place "Imagemaster"))
  248. (if (not (exists im_dest))
  249.     ( ; Then...
  250.         (makedir im_dest (infos))
  251.     )
  252. )
  253. (set @default-dest im_dest)
  254.  
  255. ; Create subordinate target strings
  256. ;----------------------------------
  257. (set rxpi_dir   (tackon im_dest "rxpi"))
  258. (set wipe_dir   (tackon rxpi_dir "wipes"))
  259. (set cmpi_dir   (tackon im_dest "cmpi"))
  260. (set ish_dir    (tackon im_dest "IShapes"))
  261. (set dev_dir    (tackon im_dest "Developer"))
  262. (set imdoc_dir  (tackon im_dest "imdoc"))
  263. (set imcat_dir  (tackon im_dest "imcat"))
  264. (set lib_dir    "libs:")
  265. (set rexx_dir   "rexx:")
  266.  
  267. ; Create RXPI drawer if it's not already there
  268. ; and if user doesn't have it custom assigned
  269. ; elsewhere
  270. ;---------------------------------------------
  271. (if (not (exists rxpi_dir))
  272.     ( ; Then...
  273.         (if (= as_made 0)
  274.             ( ; Then...
  275.                 (makedir rxpi_dir (infos))
  276.             )
  277.         )
  278.     )
  279. )
  280.  
  281. ; Create wipes drawer if it's not already there
  282. ;----------------------------------------------
  283. (if (not (exists wipe_dir))
  284.     ( ; Then...
  285.         (makedir wipe_dir (infos))
  286.     )
  287. )
  288.  
  289. ; Create CMPI drawer if it's not already there
  290. ; and if user doesn't have it custom assigned
  291. ; elsewhere
  292. ;---------------------------------------------
  293. (if (not (exists cmpi_dir))
  294.     ( ; Then...
  295.         (if (= as_made 0)
  296.             ( ; Then...
  297.                 (makedir cmpi_dir (infos))
  298.             )
  299.         )
  300.     )
  301. )
  302.  
  303. ; Create IShapes drawer if it's not already there
  304. ;------------------------------------------------
  305. (if (not (exists ish_dir))
  306.     ( ; Then...
  307.         (makedir ish_dir (infos))
  308.     )
  309. )
  310.  
  311. ; Create IMDOC drawer if it's not already there
  312. ; and if user doesn't have it custom assigned
  313. ; elsewhere
  314. ;----------------------------------------------
  315. (if (not (exists imdoc_dir))
  316.     ( ; Then...
  317.         (if (= as_made 0)
  318.             ( ; Then...
  319.                 (makedir imdoc_dir (infos))
  320.             )
  321.         )
  322.     )
  323. )
  324.  
  325. ; Create IMCAT drawer if it's not already there
  326. ; and if user doesn't have it custom assigned
  327. ; elsewhere
  328. ;----------------------------------------------
  329. (if (not (exists imcat_dir))
  330.     ( ; Then...
  331.         (if (= as_made 0)
  332.             ( ; Then...
  333.                 (makedir imcat_dir (infos))
  334.             )
  335.         )
  336.     )
  337. )
  338.  
  339. ; Make assignments so user can operate immediately
  340. ; If the user has already specially made these assignments,
  341. ; then we'll use those locations as targets instead
  342. ;----------------------------------------------------------
  343. (if (= as_made 0)
  344.     ( ; Then...
  345.         (makeassign "RXPI" rxpi_dir (safe))
  346.         (makeassign "CMPI" cmpi_dir (safe))
  347.         (makeassign "IMDOC" imdoc_dir (safe))
  348.         (makeassign "IMCAT" imcat_dir (safe))
  349.     )
  350. )
  351.  
  352. ; Extract this portion of the installation
  353. ;-----------------------------------------
  354. (run ("ram:extract >con:0/50/640/100/extract -m e ram:imi %s/" im_dest))
  355. (run ("ram:extract >con:0/50/640/100/extract -m e ram:fv %s/" im_dest))
  356. (run ("ram:extract >con:0/50/640/100/extract -m e ram:ish %s/" ish_dir))
  357.  
  358. ; Decide about .info file name
  359. ;-----------------------------
  360. (if (= float_install 0)
  361.     ( ; Then...
  362.         rename (tackon im_dest "iminfo") (tackon im_dest "imf.info")
  363.     )
  364.     ( ; Else...
  365.         rename (tackon im_dest "iminfo") (tackon im_dest "im.info")
  366.     )
  367. )
  368.  
  369. ; Clean up after these archives
  370. ;------------------------------
  371. (delete "ram:ish.lzh")
  372. (delete "ram:fv.lzh")
  373. (delete "ram:imi.lzh")
  374.  
  375. ; Install DCTV.Library
  376. ; --------------------
  377. (run ("ram:extract >con:0/50/640/100/extract -m e ram:dc ram:"))
  378. (copylib (source "ram:dctv.library") (dest "libs:"))
  379. (delete "ram:dc.lzh")
  380. (delete "ram:dctv.library")
  381.  
  382. ; Set variables pointing to the disk with the correct IM R/t archive
  383. ;-------------------------------------------------------------------
  384. (if (= float_install 0)
  385.     ( ; Then...
  386.         (set imp_src d3)
  387.         (set imv_src v3)
  388.         (set proc_file "imb.lzh")
  389.         (delete "ram:ia.lzh")
  390.         (run ("rename ram:ib.lzh ram:iii.lzh"))
  391.     )
  392.     ( ; Else...
  393.         (set imp_src d2)
  394.         (set imv_src v2)
  395.         (set proc_file "ima.lzh")
  396.         (delete "ram:ib.lzh")
  397.         (run ("rename ram:ia.lzh ram:iii.lzh"))
  398.     )
  399. )
  400.  
  401. ; Ask for the proper diskette
  402. ;----------------------------
  403. (askdisk
  404.     (prompt ("Please insert the %s diskette " imv_src))
  405.     (help "This diskette is absolutely required to complete this "
  406.           "installation! It contains the version of Imagemaster R/t "
  407.           "You requested (floating point, or non floating point).")
  408.     (dest imv_src)
  409. )
  410.  
  411. ; This gets the needed archive from the proper disk
  412. ;--------------------------------------------------
  413. (copyfiles (source imp_src)
  414.            (dest "ram:")
  415.            (pattern proc_file)
  416.            (files)
  417. )
  418.  
  419. ; Cojoin the fragments of the R/t archive and toss the sources
  420. ;-------------------------------------------------------------
  421. (run ("ram:join ram:%s ram:iii.lzh TO ram:ixi.lzh" proc_file))
  422. (delete ("ram:%s" proc_file))
  423. (delete "ram:iii.lzh")
  424.  
  425. ; Here, we extract the image processor, copying it at the same time
  426. ;------------------------------------------------------------------
  427. (run ("ram:extract >con:0/50/640/100/extract -m e ram:ixi.lzh %s/" im_dest))
  428.  
  429. ; Delete the joined image processor archive
  430. ;------------------------------------------
  431. (delete ("ram:ixi.lzh"))
  432.  
  433. ; If user wants the developer stuff, install it
  434. ;----------------------------------------------
  435. (if (= dev_install 1)
  436.     ( ; Then...
  437.         (if (not (exists dev_dir))
  438.             ( ; Then...
  439.                 (makedir dev_dir (infos))
  440.             )
  441.         )
  442.         (run ("ram:extract >con:0/50/640/100/extract -m e ram:dd %s/" dev_dir))
  443.         (delete "ram:dd.lzh")
  444.     )
  445. )
  446.  
  447. ; Install the ApAssist documentation
  448. ; ----------------------------------
  449. (askdisk
  450.     (prompt ("Please insert the %s diskette " v4))
  451.     (help "This diskette is required to complete the "
  452.           "installation. It contains the documentation "
  453.           "for the Imagemaster R/t software!")
  454.     (dest v4)
  455. )
  456. (copyfiles (source d4)
  457.            (dest "ram:")
  458.            (pattern "apa.lzh")
  459.            (files)
  460. )
  461. (run ("ram:extract >con:0/50/640/100/extract -m e ram:apa %s/" imdoc_dir))
  462. (delete "ram:apa.lzh")
  463.  
  464. ; Get the PI Module archive chunks....
  465. ;-------------------------------------
  466. (makedir "ram:gbzyx")
  467. (askdisk
  468.     (prompt ("Please insert the %s diskette " v5))
  469.     (help "This diskette is required to install "
  470.           "the PI Modules")
  471.     (dest v5)
  472. )
  473. (copyfiles (source d5)
  474.            (dest "ram:")
  475.            (pattern "piarc.lzh.parta")
  476.            (files)
  477. )
  478.  
  479. ; Get part B of the piarc.lzh file
  480. ;----------------------------------------------------------
  481. (askdisk
  482.     (prompt ("Please insert the %s diskette " v6))
  483.     (help "This diskette is required to install "
  484.           "the PI Modules.")
  485.     (dest v6)
  486. )
  487. (copyfiles (source d6)
  488.            (dest "ram:")
  489.            (pattern "piarc.lzh.partb")
  490.            (files)
  491. )
  492.  
  493. ; Now, enjoin the two lzh fragments back into a usable archive:
  494. ; -------------------------------------------------------------
  495. (run ("ram:join ram:piarc.lzh.parta ram:piarc.lzh.partb TO ram:piarc.lzh"))
  496.  
  497. ; Get rid of fragments
  498. ; --------------------
  499. (run ("ram:delete ram:piarc.lzh.part? QUIET"))
  500.  
  501. ; Now to get the PI modules installed
  502. ; Begin by backing up old macro file(s), if they exist
  503. ;-----------------------------------------------------
  504. (if (exists "s:Default.immcr.old")
  505.     (delete "s:Default.immcr.old"))
  506. (if (exists "s:Default.immcr")
  507.     (rename "s:Default.immcr" "s:Default.immcr.old"))
  508. ;---------------
  509. (if (exists "s:Default.iimcr.old")
  510.     (delete "s:Default.iimcr.old"))
  511. (if (exists "s:Default.iimcr")
  512.     (rename "s:Default.iimcr" "s:Default.iimcr.old"))
  513. ;---------------
  514. (if (exists "s:Default.ipmcr.old")
  515.     (delete "s:Default.ipmcr.old"))
  516. (if (exists "s:Default.ipmcr")
  517.     (rename "s:Default.ipmcr" "s:Default.ipmcr.old"))
  518. ;---------------
  519.  
  520. ; Old macros are backed up, ready for main PI install
  521. ; Extract the PI Modules
  522. ;----------------------------------------------------
  523. (run ("ram:extract >con:0/50/640/100/extract -m e ram:piarc ram:gbzyx/"))
  524. (delete "ram:piarc.lzh")
  525.  
  526. ; Archive is unpacked and ready to copy
  527. ; first, backup list.list if available
  528. ;--------------------------------------
  529. (if (exists "cmpi:list.list")
  530.     ( ; Then...
  531.         (if (exists "cmpi:list.list.old")
  532.             ( ; Then...
  533.                 (delete "cmpi:list.list.old")
  534.             )
  535.         )
  536.         (rename "cmpi:list.list" "cmpi:list.list.old")
  537.         (message "Please note that during installation, your previous "
  538.                  "\"list.list\" file was located and renamed to "
  539.                  "\"list.list.old\". All of your aftermarket PI "
  540.                  "modules (if any) are still intact, but will not "
  541.                  "show up on PI lists untill the new list.list file "
  542.                  "has been appropriately modified."
  543.          (help   "This has been done so that you may refer to it if "
  544.                  "you had aftermarket PI modules declared in it. "
  545.                  "A new list.list file has been created as part of "
  546.                  "this install procedure - you should use this new "
  547.                  "list.list file instead of the old one (that will "
  548.                  "happen automatically) but if you DID have any "
  549.                  "aftermarket PI modules, such as Metadigm's ES300c "
  550.                  "scanner driver, you'll need to add the control "
  551.                  "line(s) for it (them) into the new list.list file. "
  552.                  "You would then use the old list.list file as a template "
  553.                  "to accomplish this.")
  554.          )
  555.     )
  556. )
  557.  
  558. ; move the "odd" files (not PI rexx or PI cmds)
  559. ;----------------------------------------------
  560. (copyfiles (source "ram:gbzyx") (dest "rexx:")
  561.            (pattern "(picmdpath|launch.rexx|imtf.rexx)") (files))
  562. (copyfiles (source "ram:gbzyx") (dest "s:")
  563.            (pattern "(default.??mcr)") (files))
  564. (copyfiles (source "ram:gbzyx") (dest "cmpi:")
  565.            (pattern "list.list") (files))
  566. (copyfiles (source "ram:gbzyx") (dest "rxpi:wipes")
  567.            (pattern "#?.rxwp") (files))
  568. (delete "ram:gbzyx/picmdpath")
  569. (delete "ram:gbzyx/list.list")
  570. (delete "ram:gbzyx/launch.rexx")
  571. (delete "ram:gbzyx/imtf.rexx")
  572. (run "ram:delete ram:gbzyx/Default.??mcr QUIET")
  573. (run "ram:delete ram:gbzyx/#?.rxwp QUIET")
  574.  
  575. ; Next, copy all the PI ARexx scripts
  576. ;------------------------------------
  577. (copyfiles (source "ram:gbzyx") (dest "rxpi:")
  578.            (pattern "#?.rexx") (files))
  579. (run "ram:delete ram:gbzyx/#?.rexx QUIET")
  580.  
  581. ; Next, copy all the PI Commands
  582. ;-------------------------------
  583. (copyfiles (source "ram:gbzyx") (dest "cmpi:")
  584.            (pattern "#?") (files))
  585.  
  586. ; Now, we have to decide if we can install the FPU PI modules
  587. ;------------------------------------------------------------
  588. (if (exists "CMPI:rdjpg") (delete "CMPI:rdjpg"))
  589. (if (exists "CMPI:wrjpg") (delete "CMPI:wrjpg"))
  590. (if (= float_install 0)
  591.     ( ; Then...
  592.         (rename "CMPI:x_JPR030" "CMPI:rdjpg")
  593.         (rename "CMPI:x_JPW030" "CMPI:wrjpg")
  594.     )
  595.     ( ; Else...
  596.         (rename "CMPI:x_JPR000" "CMPI:rdjpg")
  597.         (rename "CMPI:x_JPW000" "CMPI:wrjpg")
  598.     )
  599. )
  600.  
  601. ; If we did NOT install ApAssist into the user's "c:" assignment
  602. ; due to a lack of room, we'll now put it here in the main IM
  603. ; drawer. This is workable for us, but unfortunate because it
  604. ; won't be generally available to other applications
  605. ; --------------------------------------------------
  606. (if (= app_in_c 0)
  607.     ( ; Then...
  608.         (copyfiles (source "ram:") (dest im_dest)
  609.                    (pattern "ApAssist") (files))
  610.         (delete "ram:ApAssist")
  611.     )
  612. )
  613.  
  614. ; clean up
  615. ;---------
  616. (run "ram:delete CMPI:x_#? QUIET")
  617. (run "ram:delete ram:gbzyx/#? QUIET")
  618. (delete "ram:gbzyx")
  619. (delete "ram:extract")
  620. (delete "ram:delete")
  621. (delete "ram:join")
  622.  
  623. ; Add assignment to user's "user-startup" directory for new boot ops
  624. ; IF they were not already correctly done - otherwise skip this part
  625. ;-------------------------------------------------------------------
  626. (if (= as_made 0)
  627.     ( ; Then...
  628.         (startup "Imagemaster"
  629.             (help "This operation adds lines to your user-startup file "
  630.                   "which are harmless assignment statements to drawers "
  631.                   "within the Imagemaster drawer, called \"RXPI:\", \"IMDOC:\", "
  632.                   "\"IMCAT:\" and \"CMPI:\" each time you boot your Amiga. "
  633.                   "These assignments are used to let Imagemasters Public "
  634.                   " Interface \(PI\) drivers know where its data files reside. "
  635.                   "Unless you know that you have another assignment with one "
  636.                   "of these names, it is extremely unlikely that there would "
  637.                   "be any reason to NOT let this happen.")
  638.             (prompt "Is it o.k. to add four SAFE lines to your User-Startup "
  639.                     "file?")
  640.             (command ("assign RXPI: %s\n" rxpi_dir))
  641.             (command ("assign CMPI: %s\n" cmpi_dir))
  642.             (command ("assign IMDOC: %s\n" imdoc_dir))
  643.             (command ("assign IMCAT: %s\n" imcat_dir))
  644.         )
  645.     )
  646. )
  647.  
  648. (exit)
  649.